package com.itcast.Service.ServiceImpl;

import com.itcast.Dao.PublicDao;
import com.itcast.Dao.UserDao;
import com.itcast.Service.PublicService;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

public class PublicServiceImpl implements PublicService {
    private UserDao userDao;
    private PublicDao publicDao;
    public PublicServiceImpl(UserDao userDao, PublicDao publicDao) {
        this.userDao = userDao;
        this.publicDao = publicDao;
    }

    @Override
    public void save() {
        System.out.println("servicesave***");
        publicDao.save();
        userDao.save();
    }

}
